package com.blog.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * 与数据库article表对应
 *
 * 注意：数据库与实体类属性对应，一定要使用包装类
 * 在mybatisplus中,update语句中会默认把不为null的属性添加在更新语句中
 */
@Data
public class Article implements Serializable {

    public static final int Article_TOP = 1;

    public static final int Article_Common = 0;

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    private String title;

    private String summary;

    private Integer commentCounts;

    private Integer viewCounts;

    /**
     * 作者id
     */
    private Long authorId;
    /**
     * 内容id
     */
    private Long bodyId;
    /**
     *类别id
     */
    private Long categoryId;

    /**
     * 置顶
     */
    private Integer weight;

    /**
     * 创建时间
     */
    private Timestamp createDate;
}
